package cn.jdy.common.constant;

import java.util.HashMap;
import java.util.Map;

/**
 * 订单相关参数常量类
 *
 * @author Zhang Yuyong
 */
public class BankConstant {

	/**
	 * *********************银行编码*************************
	 */
	public static final String BANKNO_UNIONPAY = "0010";
	public static final String BANKNO_CHINAPAY = "0011";
	public static final String BANKNO_UPOMP = "0015";
	public static final String BANKNO_ICBC = "0020";
	public static final String BANKNO_CCB = "0030";
	public static final String BANKNO_ABC = "0040";
	public static final String BANKNO_BOC = "0050";
	public static final String BANKNO_BOCOM = "0060";
	public static final String BANKNO_PSBC = "0070";
	public static final String BANKNO_CMB = "0080";
	public static final String BANKNO_ALIPAY = "1010";

	public static final Map<String, String> bankNoMap = new HashMap<String, String>() {{
		put("unionPay", BANKNO_UNIONPAY);
		put("chinaPay", BANKNO_CHINAPAY);
		put("icbc", BANKNO_ICBC);
		put("cmb", BANKNO_CMB);
		put("boc", BANKNO_BOC);
		put("aliPay", BANKNO_ALIPAY);
		put("upomp", BANKNO_UPOMP);
	}};

	/**
	 * *********************订单状态*************************
	 */
	public static final String ORDER_SUC = "1";//支付成功
	public static final String ORDER_FAIL = "2";//支付失败
	public static final String ORDER_CANCEL = "3";//取消订单
	public static final String ORDER_UNPAY = "4";//未支付

	/**
	 * *********************订单销账状态*************************
	 */
	public static final String CHARGEAMT_SUC = "1";//销账成功
	public static final String CHARGEAMT_FAIL = "2";//销账失败
	public static final String CHARGEAMT_PROCESS = "3";//销账已发送
	public static final String CHARGEAMT_INIT = "4";//未销账

	/**
	 * *********************订单处理结果*************************
	 */
	public static final String BACK_BUSI_HANDLE_SUC = "success";
	public static final String BACK_BUSI_HANDLE_FAIL = "error";

	/**
	 * *********************订单类型*************************
	 */
	public static final String ORDER_TYPE_PAY = "1";//购买商机
	public static final String ORDER_TYPE_TOPUP = "2";//会员充值
	public static final String ORDER_TYPE_REFUND = "3";//退款

	/**
	 * *********************币种*************************
	 */
	public static final String CURTYPE_RMB = "1";//支付
	public static final String CURTYPE_US = "2";//退款

	/**
	 * **************银行参数常量-->招商银行*****************
	 */
	public final static String CMB_CHARSET = "UTF-8";//编码方式
	public final static String CMB_SIGNTYPE = "MD5";
	public static final String CMB_RESULT_SUC = "Y";

	/**
	 * **************银行参数常量-->支付宝*****************
	 */
	public final static String ALIPAY_CHARSET = "UTF-8";//编码方式
	public final static String ALIPAY_SIGNTYPE = "MD5";
	public final static String ALIPAY_RESULT_SUC = "T";//成功

	/**
	 * **************银行参数常量-->中国银联*****************
	 */
	public final static String UNIONPAY_CHARSET = "UTF-8";//成功
	public final static String UNIONPAY_SIGNTYPE = "MD5";
	public final static String UNIONPAY_RESULT_SUC = "00";//成功
	public final static String UPOMP_RESULT_SUC = "00";//成功

	/**
	 * **************银行参数常量-->银联商务*****************
	 */
	public final static String CHINAPAY_RESULT_SUC = "1001";//成功


	/**
	 * *********************缓存KEY*************************
	 */
	public static final String M_KEY_ORDER_INFO = "100020003";//订单信息


	/**
	 * *********************其他*************************
	 */
	public static final String EXCEPTION_PAGE = "/common/500.shtml";//500 页面
	public static final String SERVICE_XML_ROOT_DATANODE = "data";   //xml根节点命名
	public static final String[] BUSITYPE = {"01", "02", "03"};//操作类型(01：电费缴纳；02：智能表购电；03：企业版网银支付)
	public static final String[] ORDERLOG_SATUS = {"0", "1", "2", "3", "4", "5"};  //订单日志状态 0 无 ,1生成流水号 2生产订单 3 等待在线 4 银行回调 5 销账
	public static final String[] ORDERLOG_FLAG = {"0", "1", "2"};  //订单日志状态  成功标示 0 成功 1超时 2 内部错误


	public static final double EXCHANGE = 100D;//S币汇率
}
